pytorch load model

125

pytorch load model -

model = TheModelClass(*args, **kwargs)
model.load_state_dict(torch.load(PATH))
model.eval()

how to save a neural network pytorch -

Saving:
	torch.save(model, PATH)


Loading: 
	model = torch.load(PATH)
	model.eval()

Comments

Submit
0 Comments